package com.cn.aam.checaiduo.ui.me;

import android.content.Context;
import android.content.Intent;
import android.view.View;

import com.cn.aam.checaiduo.AppData;
import com.cn.aam.checaiduo.R;
import com.cn.aam.checaiduo.base.BaseActivity;
import com.cn.aam.checaiduo.base.ToolBarManager;
import com.cn.aam.checaiduo.center.CustomDialogCenter;
import com.cn.aam.checaiduo.ui.homepage.MainActivity;
import com.cn.aam.checaiduo.ui.useraccess.RegisterActivity;

import butterknife.OnClick;

import static com.cn.aam.checaiduo.Const.INTENT_REQUEST_PARK;


//新手乐园
public class BeginnerParkActivity extends BaseActivity {


    public static Intent newInstance(Context context) {
        Intent intent = new Intent(context, BeginnerParkActivity.class);
        return intent;
    }

    @Override
    protected int layoutId() {
        return R.layout.activity_beginner_park;
    }

    @Override
    protected void initView() {
        ToolBarManager.with(this, WMContent)
                .setLeftMenuIconRes(R.drawable.ic_nav_arrow_white)
                .setBackground(R.color.trans).setTitle("")
                .setLeftMenuIconClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        CustomDialogCenter.getInstance().showExitParkDialog(mContext);
                    }
                });
    }

    public void clickToInvest(View view) {
        startActivity(MainActivity.newInstance(mContext, INTENT_REQUEST_PARK));
        AppData.closeActivityExceptMain();
    }

    @OnClick(R.id.park_iv_register)
    void clickToRegister() {
        startActivity(RegisterActivity.newInstance(mContext));
    }

    @OnClick(R.id.park_iv_introduce)
    void clickToIntroduce() {
        startActivity(PlatformIntroduceActivity.newInstance(mContext, PlatformIntroduceActivity.FLAG_INTRODUCE));
    }

    @Override
    public void onBackPressed() {
        CustomDialogCenter.getInstance().showExitParkDialog(mContext);
    }
}
